from django.db import models


# 部门表
class AdminDepartment(models.Model):
    name = models.CharField(max_length=32, verbose_name='部门名称')
    director = models.CharField(max_length=32, null=True, blank=True, verbose_name='负责人')
    director_tel = models.CharField(max_length=15, null=True, blank=True, verbose_name='部门联系方式')
    remarks = models.CharField(max_length=255, null=True, blank=True, verbose_name='备注')
    ord = models.PositiveIntegerField(default=0, verbose_name='排序')
    is_delete = models.BooleanField(default=False, verbose_name='是否删除 1删除 0正常')
    pid = models.PositiveIntegerField(default=0, verbose_name='父级')

    class Meta:
        db_table = 'zeus_admin_department'
        verbose_name = '部门'
        verbose_name_plural = verbose_name

        def __str__(self):
            return self.name
